package com.mwh.yuantu.dao;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mwh.yuantu.dao.mapper.FieldProfileInfoMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mwh.yuantu.entity.FieldProfileInfoEntity;

/**
 * (FieldProfileInfo)表数据库访问层
 *
 * @author maweihong
 * @since 2023-11-01 09:47:30
 */
@Service
public class FieldProfileInfoDao extends ServiceImpl<FieldProfileInfoMapper , FieldProfileInfoEntity> {

    @Autowired
	private FieldProfileInfoMapper fieldProfileInfoMapper;

    /**
     * 根据字段主键查询字段详情列表
     * @param fieldId 字段主键
     * @return
     */
    public List<FieldProfileInfoEntity> listByFieldId(String fieldId){
        return fieldProfileInfoMapper.listByFieldId(fieldId);
    }

    /**
     * 插入一条新数据
     * @param fieldProfileInfo
     * @return
     */
    public int insert(FieldProfileInfoEntity fieldProfileInfo){
        return fieldProfileInfoMapper.insert(fieldProfileInfo);
    }

    /**
     * 更新一条新数据
     * @param fieldProfileInfo
     * @return
     */
    public int update(FieldProfileInfoEntity fieldProfileInfo){
        return fieldProfileInfoMapper.update(fieldProfileInfo);
    }

    /**
     * 批量删除内容
     * @param idArr 主键数组
     * @return
     */
    public int delete(@Param("idArr") String[] idArr){
        return fieldProfileInfoMapper.delete(idArr);
    }

    /**
     * 根据主键，查询对应的文本
     * @param id 主键
     * @return
     */
    public String selectById(String id){
        return fieldProfileInfoMapper.selectById(id);
    }

    /**
     * 根据主键数组，查询对应的文本list
     * @param idArr
     * @return
     */
    public List<String> selectByIdArr(@Param("idArr") String[] idArr){
        return fieldProfileInfoMapper.selectByIdArr(idArr);
    }

}

